/* --- ESTILOS GERAIS --- */
body {
    background-color: #020617;
    color: #e2e8f0;
    font-family: 'Inter', sans-serif;
    font-feature-settings: "cv02", "cv03", "cv04";
    overflow-x: hidden;
}

.fundo-ativar-desativar-tema {
    background-color: #070629;
    box-shadow: 1px 2px 1px rgb(71, 71, 71);
}

.icon-animation {
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Anima o ícone quando o link pai recebe hover */
.nav-item:hover .icon-animation {
    transform: rotateZ(45deg); /* 180 fica bem legal para ícones */
}

/* Opcional: Adiciona profundidade ao link */
.nav-item {
    perspective: 1000px;
}

/* --- INPUTS E FORMULÁRIOS --- */
.input-dark,
select.input-dark {
    background: #0f172a;
    border: 1px solid #334155;
    color: white;
    padding: 0.7rem 1rem;
    border-radius: 0.75rem;
    width: 100%;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Correção para inputs que têm ícones dentro */
.relative .input-dark {
    padding-left: 2.8rem;
}

/* Estados dos inputs */
.input-dark:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
    background: #1e293b;
}

.input-dark:hover:not(:focus) {
    border-color: #475569;
    background: #162032;
}

select.input-dark {
    appearance: none;
    cursor: pointer;
}

select.input-dark option {
    background-color: #0f172a;
    color: white;
    padding: 10px;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #020617;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 99px;
    border: 2px solid #020617;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Remove scrollbar visual mas mantem funcionamento */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* --- CARDS E SEÇÕES --- */
.section-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.section-card:hover {
    border-color: rgba(51, 65, 85, 0.8);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* --- NAVEGAÇÃO INTERNA (PÍLULAS) --- */
.shortcut-nav {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(30, 41, 59, 0.5);
}

.mask-gradient {
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.nav-pill {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #94a3b8;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.nav-pill:hover {
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.05);
}

.nav-pill.active {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
}

.nav-pill.active i {
    color: #34d399;
}

/* --- UI ELEMENTS --- */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 90%;
    background-color: oklch(20.8% 0.042 265.755) !important
}

/* --- UI ELEMENTS --- */
.light .toast-container {
    background-color: oklch(36.768% 0.00004 271.152) !important;
    box-shadow: 2px 3px 4px black;
}

input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
    opacity: 0.6;
}

.perfil {
    transition: transform 0.2s;
}

.perfil:hover {
    transform: scale(1.02);
    background-color: rgba(30, 41, 59, 0.5);
    cursor: pointer;
}

/* Highlight effect */
.section-highlight {
    animation: highlightPulse 1.5s ease-out;
}

.light .btn-adicionar-duvida:hover {
    background-color: oklch(71.4% 0.203 305.504) !important;
    color: white !important;
}

/* Cards de Dúvidas no modo claro */
.light .duvida-card {
    background-color: #f1f5f9 !important;
    border-color: #e0e7ff !important;
}

.light .duvida-item {
    background-color: #e0e7ff !important;
    border-color: #c7d2fe !important;
}

.light .duvida-titulo,
.light .duvida-resposta {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #1e293b !important;
}

/* Ajuste do texto para não sumir no fundo claro */
.light .aviso h4, 
.light .aviso p, 
.light .aviso i,
.light .aviso,
.light .aviso .icone-aviso {
    color: #b91c1c !important; /* Texto em vermelho escuro para leitura */
}

@keyframes highlightPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
        border-color: #10b981;
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
        border-color: #10b981;
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* --- ANIMAÇÕES DA SIDEBAR --- */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-15px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.nav-item {
    animation: slideIn 0.4s ease forwards;
    opacity: 0;
}

/* Delays para efeito cascata */
.nav-item:nth-child(1) {
    animation-delay: 0.1s;
}

.nav-item:nth-child(2) {
    animation-delay: 0.15s;
}

.nav-item:nth-child(3) {
    animation-delay: 0.2s;
}

.nav-item:nth-child(4) {
    animation-delay: 0.25s;
}

/* --- CHECKBOX CUSTOMIZADO --- */
.checkbox-custom {
    appearance: none;
    background-color: #1e293b;
    margin: 0;
    font: inherit;
    color: currentColor;
    width: 1.35em;
    height: 1.35em;
    border: 2px solid #475569;
    border-radius: 0.4em;
    display: grid;
    place-content: center;
    transition: all 0.2s;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-custom::before {
    content: "";
    width: 0.75em;
    height: 0.75em;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em white;
    transform-origin: center;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.checkbox-custom:checked {
    background-color: oklch(62.7% 0.265 303.9);
    border-color: oklch(62.7% 0.265 303.9);
}

.checkbox-custom:checked::before {
    transform: scale(1);
}

/* --- ESTILO UNIFICADO PARA BOTÕES DE REMOVER (LIXO) --- */
.btn-remover-centralizado,
.btn-trash-service,
.btn-remove-block {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background-color: transparent !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.btn-remover-centralizado:hover,
.btn-trash-service:hover,
.btn-remove-block:hover {
    transform: scale(1.2) !important;
    color: #ef4444 !important;
}

.btn-remover-centralizado:active,
.btn-trash-service:active,
.btn-remove-block:active {
    transform: scale(0.9) !important;
}

/* --- CORREÇÃO DE NÚMEROS CORTADOS --- */
.service-price,
.service-duration,
input[type="time"],
.input-dark,
.light .input-time-field {
    font-family: 'Inter', sans-serif !important;
    line-height: 1.5 !important;
    padding-top: 0.6rem !important;
    padding-bottom: 0.6rem !important;
    overflow: visible !important;
}

.service-price,
.service-duration,
.input-dark {
    line-height: 1.2 !important;
    height: 38px !important;
}

.input-dark.text-center {
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
}

.lunch-start,
.lunch-end,
input[type="time"] {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
}

.light .input-time-field {
    width: 115px !important;
    padding-left: 8px !important;
    padding-right: 4px !important;
    background-color: #ffffff !important;
    color: #1e293b !important;
    font-variant-numeric: tabular-nums;
    display: inline-flex;
    align-items: center;
}

input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(0.4) !important;
    cursor: pointer;
    margin-left: 2px;
    background: none;
    display: none;
    -webkit-appearance: none;
}

/* Remove os botões de aumentar/diminuir (spin-buttons) */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.font-mono {
    font-feature-settings: "tnum" 1;
    letter-spacing: 0.02em;
}

.barber-name:focus {
    outline: none !important;
    box-shadow: none !important;
}

.input-almoco {
    width: 2vw;
    font-size: 10px;
}

/* --- MODO CLARO --- */
.light body,
.light main,
.light #main-scroll {
    background-color: #f8fafc !important;
}

.light aside {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: rgb(82, 82, 82) 2px 0px 20px;
}

/* Cards e containers com fundo branco */
.light .section-card,
.light .bg-slate-800,
.light .bg-slate-900,
.light .bg-slate-700\/50,
.light .bg-slate-950\/50,
.light .service-card,
.light .barber-card,
.light .block-card {
    background-color: #ffffff !important;
}

/* Gradientes removidos no modo claro */
.light .bg-gradient-to-r {
    background-image: none !important;
}

.light .shortcut-nav {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    border-radius: 15px;
    box-shadow: rgb(82, 82, 82) 2px 3px 4px;
}

.light .text-white {
    color: #1e293b !important;
}

.light .text-slate-300,
.light .text-slate-400 {
    color: #475569 !important;
}

.light .text-slate-500 {
    color: #334155 !important;
}

.light h2,
.light h3 {
    color: #0f172a !important;
}

.light .text-orange-400 {
    color: #ea580c !important;
}

.light .text-purple-400 {
    color: #7e22ce !important;
}

.light .section-card {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: rgb(82, 82, 82) 2px 3px 4px !important;
}

.light .border-slate-700,
.light .border-emerald-500\/30,
.light div[class*="border-slate-"],
.light div[class*="border-gray-"],
.light .border,
.light .border-slate-800,
.light .border-transparent {
    border-color: #e2e8f0 !important;
}

.light .rounded-xl,
.light .rounded-lg {
    border-color: #e2e8f0 !important;
}

.light hr,
.light .border-t,
.light .border-b {
    border-color: #f1f5f9 !important;
}

.light .divide-slate-800\/30 > * + * {
    border-color: #f1f5f9 !important;
}

.light .input-dark,
.light input[type="text"],
.light input[type="number"],
.light input[type="time"],
.light select.input-dark,
.light .service-name,
.light .service-price,
.light .service-duration,
.light .barber-name,
.light .lunch-start,
.light .lunch-end {
    background-color: #e6e9ec !important;
    border: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
    box-shadow: 1px 2px 3px black;
}

.light select.input-dark option {
    background-color: #999999;
    color: white;
    padding: 10px;
}

.light .barber-name,
.light .service-name,
.light .lunch-start,
.light .lunch-end {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

.light .lunch-start,
.light .lunch-end {
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
}

.light .input-dark:focus,
.light .barber-name:focus {
    background-color: #ffffff !important;
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.light .barber-name:focus {
    background-color: #f8fafc !important;
}

.light .input-dark:hover:not(:focus) {
    border-color: #9ca3af !important;
}

.light i[data-lucide] {
    opacity: 0.8 !important;
}

.light button.bg-emerald-600 {
    background-color: #10b981 !important;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2) !important;
}

.light button[onclick="addService()"] {
    background-color: #ffffff !important;
    color: #059669 !important;
    border-color: #d1d5db !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

.light button[onclick="addService()"]:hover {
    background-color: #10b981 !important;
    color: #ffffff !important;
    border-color: #10b981 !important;
}

.light button[onclick="addBarber()"] {
    background-color: #ffffff !important;
    color: oklch(62.7% 0.265 303.9) !important;
    border-color: #d1d5db !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

.light button[onclick="addBarber()"]:hover {
    background-color: oklch(62.7% 0.265 303.9) !important;
    color: #ffffff !important;
    border-color: oklch(62.7% 0.265 303.9) !important;
}

.light button[onclick="addBlock()"] {
    background-color: #ffffff !important;
    color: oklch(63.7% 0.237 25.331) !important;
    border-color: #d1d5db !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

.light button[onclick="addBlock()"]:hover {
    background-color: oklch(63.7% 0.237 25.331) !important;
    color: #ffffff !important;
    border-color: oklch(63.7% 0.237 25.331) !important;
}

.light .btn-remove i {
    color: #64748b !important;
}

.light .btn-remove-barber {
    color: #ef4444 !important;
}

.light .btn-remove-barber:hover {
    background-color: #fef2f2 !important;
}

.light .btn-remover-centralizado,
.light .btn-trash-service {
    background-color: transparent !important;
    color: #64748b !important;
}

.light .btn-remover-centralizado:hover,
.light .btn-trash-service:hover {
    background-color: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #fee2e2 !important;
}

.light .nav-pill {
    color: #64748b !important;
}

.light .nav-pill:hover {
    color: #1f2937 !important;
    background: rgba(0, 0, 0, 0.05) !important;
}

.light .nav-pill.active {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #059669 !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
}

.light .bg-purple-500\/20 {
    background-color: #f3e8ff !important;
    color: #7e22ce !important;
}

.light .shadow-lg,
.light .shadow-xl,
.light .shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}

.light ::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.light ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border: 2px solid #f1f5f9;
}

.light ::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Background decorativo no modo claro */
.light .bg-emerald-500\/5 {
    background-color: rgba(16, 185, 129, 0.03) !important;
}

.light .bg-purple-500\/5 {
    background-color: rgba(147, 51, 234, 0.03) !important;
}

.light .group\/rel:hover {
    background-color: #f1f5f9 !important;
}

.light .group\/help:hover {
    background-color: #eff6ff !important;
}

.light .group\/logout:hover {
    background-color: #fef2f2 !important;
    color: #ef4444 !important;
}

.light .group\/logout:hover i {
    color: #ef4444 !important;
}

/* Botões modo claro */
.light .btn-descartar {
    box-shadow: rgb(82, 82, 82) 2px 3px 4px;
    transition: transform 0.2s;
}

.light .btn-salvar {
    box-shadow: 2px 3px 4px black !important;
    background-color: oklch(69.6% 0.17 162.48);
}

.light .btn-salvar:hover {
    box-shadow: 2px 3px 4px black !important;
    transform: translateY(-2px) !important;
    background-color: oklch(76.5% 0.177 163.223);
}

.light .btn-descartar:hover {
    box-shadow: rgb(82, 82, 82) 2px 3px 4px;
    transform: translateY(-2px);
}

.light .btn-tema {
    box-shadow: rgb(82, 82, 82) 2px 3px 4px;
    transform: translateY(-2px);
}

.light .fundo-ativar-desativar-tema {
    background-color: #d1d4d6;
    box-shadow: 1px 2px 1px rgb(71, 71, 71);
}

.light .ativar-desativar-tema {
    background-color: black;
}

/* --- CORREÇÃO DEFINITIVA DO PERFIL (MODO CLARO) --- */
.light aside .perfil,
.light .perfil {
    background-color: oklch(87.1% 0.006 286.286) !important;
    border: 1px solid #818181 !important;
    box-shadow: 1px 2px 3px black !important;
    transition: all 0.3s ease !important;
}

.light aside .perfil:hover,
.light .perfil:hover {
    background-color: #dce0e4 !important;
    border-color: #10b981 !important;
    transform: translateY(-2px) scale(1.02);
}

/* Avatar do perfil com fundo branco no modo claro */
.light .perfil .bg-slate-700 {
    background-color: #ffffff !important;
}

.light .perfil #user-name-display {
    color: #1e293b !important;
}

.light .perfil #user-email-display {
    color: #64748b !important;
}

.light .nav-item-config {
    background-color: oklch(95% 0.052 163.051) !important;
    color: #059669 !important;
    transform: translateX(4px);
}

/* Efeito de Hover Refinado */
.light .nav-item:hover {
    background-color: rgba(16, 185, 129, 0.08) !important;
    color: #059669 !important;
    transform: translateX(4px);
}

/* Feedback visual no botão de Sair */
button[onclick="logout()"]:hover i {
    transform: translateX(-3px);
    transition: transform 0.2s ease;
}

.btn-salvar {
    background-color: #10b981; 
    background-color: oklch(59.6% 0.145 163.225);
    
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    transition: all 0.2s ease;
    border: none; /* Garante que não apareça borda de botão padrão */
    cursor: pointer;
}

.btn-salvar:hover {
    transform: scale(1.05);
    background-color: oklch(69.6% 0.17 162.48);
}

/* Logo Pulsante (Sutil) */
.group:hover img {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.bg-contrast-logo {
    background-color: rgba(30, 41, 59, 0.5);
}

.light .bg-contrast-logo {
    background-color: #afb7be !important;
    box-shadow: #343638 1px 1px 10px;
}

/* FAB (Botão Flutuante Mobile) */
.fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 50;
    display: none;
}

/* --- RESPONSIVIDADE --- */
@media (max-width: 768px) {
    .fab {
        display: flex;
    }

    .section-card {
        padding: 1.25rem;
    }

    .pill-text {
        display: none;
    }

    /* Container distribui os ícones igualmente */
    .shortcut-nav .flex {
        overflow-x: hidden !important;
        justify-content: space-around;
        padding: 0.5rem 0;
        gap: 0 !important;
    }

    /* Cada pill com tamanho fixo e idêntico */
    .nav-pill {
        padding: 0 !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 0 !important;
    }

    /* Ícone com tamanho fixo */
    .nav-pill i {
        margin: 0 !important;
        width: 20px !important;
        height: 20px !important;
        min-width: 20px !important;
        min-height: 20px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* SVGs gerados pelo Lucide Icons com tamanho forçado */
    .nav-pill i svg {
        width: 20px !important;
        height: 20px !important;
    }
}


@media (max-width: 400px) {
    .section-card {
        padding: 1rem !important;
    }

    input[type="time"] {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        font-size: 13px !important;
    }

    .w-32 {
        width: 5rem !important;
    }

    .truncate {
        max-width: 80px;
    }

    .nav-pill {
        padding: 0.5rem 0.85rem !important;
        font-size: 0.75rem !important;
    }

    .shortcut-nav {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
}